var Stage = EventDispatcher.extend({
	
	canvas: null,
	width: null,
	height: null,
	
	constructor: function(canvas)
	{
		this.canvas = canvas;
		this.width = canvas.attributes.width.value;
		this.height = canvas.attributes.height.value;
		var interval = 1000 / Stage.FRAME_RATE;
		setInterval(handler(this, 'dispatchEnterFrame'), interval);
	},
	
	dispatchEnterFrame: function(evt)
	{
		this.clearFrame();
		this.dispatchEvent('enterFrame');
	},
	
	clearFrame: function()
	{
		this.canvas.width = this.canvas.width;
	}

}, {
	FRAME_RATE: 24
});